#!/bin/sh
#

#echo "NETSCAPE_CATALYST=$NETSCAPE_CATALYST"
#echo "IE_CATALYST=$IE_CATALYST"
if [ "$NETSCAPE_CATALYST" != "" ]; then
	if [ -r $NETSCAPE_CATALYST ]; then
		echo "Netscape is starting: using  "$NETSCAPE_CATALYST "..."
		#$NETSCAPE_CATALYST -xrm "*useStderrDialog: False" -xrm "*strings.22130:This process will launch\nan installation from the $ISSUE_NAME.\n\nProceed?\n" -geometry =620x775+0+0 $WWW_FIRST 2>&-
		#$NETSCAPE_CATALYST -geometry =620x775+0+0 $WWW_FIRST 2>&-
		$NETSCAPE_CATALYST $WWW_FIRST 2>&-
		#echo "Netscape is starting... "	
		echo ""	
		echo ""	
	else
		echo "Cannot execute $NETSCAPE_CATALYST";
	fi
else if [ "$IE_CATALYST" != "" ]; then
	if [ -r $IE_CATALYST ]; then
		echo "Internet explorer is starting: using  "$IE_CATALYST "..."
		#$IE_CATALYST -xrm "*useStderrDialog: False" -xrm "*strings.22130:This process will launch\nan installation from the $ISSUE_NAME.\n\nProceed?\n" -geometry =620x775+0+0 $WWW_FIRST 2>&-
		$IE_CATALYST -geometry =620x775+0+0 $WWW_FIRST 2>&-
	else
		echo "Cannot execute $IE_CATALYST";
	fi
     else
	echo
	echo
	echo "Neither Netscape Navigator nor Internet Explorer were found."
	echo "Please install one of these browser before using this CD."
	echo "Thank you."
	echo
     fi
fi

#LAUNCH_NETSCAPE=`which netscape`
#echo "Launching Netscape from $LAUNCH_NETSCAPE"
#$LAUNCH_NETSCAPE $WWW_FIRST
#/usr/dist/exe/netscape $WWW_FIRST
#$CD_MOUNT/products/.bin/gui/$CDWARE_ENV/netscape$OS_REV -xrm "*useStderrDialog: False" -xrm "*strings.22130:This process will launch\nan installation from the $ISSUE_NAME.\n\nProceed?\n" -geometry =620x775+0+0 $WWW_FIRST 
		#$CD_MOUNT/.products/.bin/gui/$CDWARE_ENV/netscape$OS_REV -xrm "*useStderrDialog: False" -xrm "*strings.22130:This process will launch\nan installation from the $ISSUE_NAME.\n\nProceed?\n" -geometry =600x775+0+0 $WWW_FIRST 2>&-
#fi

#
# clean-up
#
#echo "server_process=$server_process"
kill -9 $server_process >&-
#echo "serverprocess killed"

#if [ -f $DISC_DIR/nostart ];then
#        # kill sound
#        if [ -r $DISC_DIR/sound.pid ]; then
#        kill -9 `cat $DISC_DIR/sound.pid`
#        fi
#        rm -r $DISC_DIR
#        exit 0
#fi
#
#if [ -w /dev/audio -a ! -f $DISC_DIR/noplay ]; then 
#	if [ $CDWARE_ENV != "Solaris_1" ]; then
#        	audioplay -i $CD_MOUNT/products/bin/gui/audio/thanks.au&
#	else
#        	cat $CD_MOUNT/products/bin/gui/audio/thanks.au > /dev/audio&
#	fi
#fi
## kill httpd
#if [ -r $DISC_DIR/logs/httpd.pid ]; then
#	kill -9 `cat $DISC_DIR/logs/httpd.pid`
#fi
#     echo ""
#     echo "Shutting down NetResults server..."
#     echo ""
#     echo "" 
#     kill -9 `cat $DISC_DIR/nrserver.pid`
#
#
#if [ -h $HOME/.netscape/lock ]; then
#	echo "Netscape seems to have crashed. Removing $HOME/.netscape/lock file."
#	echo
#	rm -rf $HOME/.netscape/lock
#fi
#
#
## remove httpd config
#if [ -d $DISC_DIR ]; then
#	echo "removing $DISC_DIR directory"
#	rm -rf $DISC_DIR
#fi
#
## remove .netscape dir if exists 
## remove .netscape
#if [ "$dir_exist" = "0" ]; then 
#        rm -rf $HOME/.netscape 
#fi
## no "else" was used here  
#if [ "$dir_exist" = "1" ]; then
#        cp $HOME/.netscape.solcd/preferences.js $HOME/.netscape
#        rm -rf $HOME/.netscape.solcd
#fi
#
#
#echo ""
#echo ""

exit 0
